package com.isale.model.db;

import com.isale.common.model.db.BaseDbEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;


/**
 * 数据库表【sys_resource】对应的entity对象
 *
 * @author bjs
 * @date 2016-11-22 15:18:07
 */
@Entity
@Table(name = "sys_resource")
public class SysResource extends BaseDbEntity implements Serializable {


    //
    @Column(name = "name", nullable = false)
    private java.lang.String name;


    //
    @Column(name = "type", nullable = false)
    private java.lang.String type;


    //
    @Column(name = "url", nullable = false)
    private java.lang.String url;


    //
    @Column(name = "parent_id", nullable = false)
    private java.lang.Long parentId;


    //
    @Column(name = "parent_ids", nullable = false)
    private java.lang.String parentIds;


    //
    @Column(name = "permission", nullable = false)
    private java.lang.String permission;


    //
    @Column(name = "available", nullable = false)
    private java.lang.Integer available;

    // ================================================================================================

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.String
     */
    public java.lang.String getName() {
        return name;
    }

    /**
     * 设置对象的属性【】
     *
     * @param name
     */
    public void setName(java.lang.String name) {
        this.name = name;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.String
     */
    public java.lang.String getType() {
        return type;
    }

    /**
     * 设置对象的属性【】
     *
     * @param type
     */
    public void setType(java.lang.String type) {
        this.type = type;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.String
     */
    public java.lang.String getUrl() {
        return url;
    }

    /**
     * 设置对象的属性【】
     *
     * @param url
     */
    public void setUrl(java.lang.String url) {
        this.url = url;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.Long
     */
    public java.lang.Long getParentId() {
        return parentId;
    }

    /**
     * 设置对象的属性【】
     *
     * @param parentId
     */
    public void setParentId(java.lang.Long parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.String
     */
    public java.lang.String getParentIds() {
        return parentIds;
    }

    /**
     * 设置对象的属性【】
     *
     * @param parentIds
     */
    public void setParentIds(java.lang.String parentIds) {
        this.parentIds = parentIds;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.String
     */
    public java.lang.String getPermission() {
        return permission;
    }

    /**
     * 设置对象的属性【】
     *
     * @param permission
     */
    public void setPermission(java.lang.String permission) {
        this.permission = permission;
    }

    /**
     * 获取对象的属性【】
     *
     * @return java.lang.Integer
     */
    public java.lang.Integer getAvailable() {
        return available;
    }

    /**
     * 设置对象的属性【】
     *
     * @param available
     */
    public void setAvailable(java.lang.Integer available) {
        this.available = available;
    }

    // ================================================================================================

    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("SysResource=====>");
        sb.append("{");
        sb.append("id=>" + this.id).append(", ");
        sb.append("name=>" + this.name).append(", ");
        sb.append("type=>" + this.type).append(", ");
        sb.append("url=>" + this.url).append(", ");
        sb.append("parentId=>" + this.parentId).append(", ");
        sb.append("parentIds=>" + this.parentIds).append(", ");
        sb.append("permission=>" + this.permission).append(", ");
        sb.append("available=>" + this.available).append(", ");
        sb.append("}");
        return sb.toString();
    }

}